package io;

import java.io.*;

/**
 * 自行组建流链接，使用PrintWriter按行写出字符串
 *
 */


public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {




//        FileOutputStream fos = new FileOutputStream("osw.txt");
//        OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");
//
//        osw.write("斤斤计较军军军军");
//        osw.write("我我我我我我我我我我我我我我");
//        System.out.println("写出完毕！");
//
//
//        osw.close();













        FileOutputStream fos = new FileOutputStream("pw.txt");
        OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");

        BufferedWriter bw = new BufferedWriter(osw);
        PrintWriter pw = new PrintWriter(bw);

        pw.println("你会挽着我的衣袖~");
        pw.println("我会把手踹进裤兜~");
        System.out.println("写出完毕！");
        pw.close();

























    }
}
